pre>+ func getContentView() -> UIView? {
+        for v in subviews {
              +            if let ContentClass = NSClassFromString("_UINavigationBarContentView"), v.isKind(of: ContentClass) {
              + return v
+ }
+ }
+ return nil
+ }
+
+    func getShadowView() -> UIView? {
              +        guard let barBackground = getBarBackground() else { return nil }
              +        for v in barBackground.subviews {
              +            if (v.bounds.height == 0.5) {
              + return v
+ }
+ }
+ return nil
+ }
+
+    func getNavigationBarBounds() -> CGRect {
              + let statusHeight = UIApplication.shared.statusBarFrame.height
+ return CGRect(x: 0, y: -statusHeight, width: bounds.width, height: bounds.height + statusHeight)
+ }
+
+    override func value(forUndefinedKey key: String) -> Any? {
              + return nil
+ }
+}
+
+/// NavigationBar transition
+extension NavigationBar {
              +    func constructViewHierarchy() {
              + setupShadowView()
+ setupBackgroundImageView()
+
+        guard let barBackground = getBarBackground() else { return }
              +
+ insertSubview(shadowImageView, aboveSubview: barBackground)
+ insertSubview(backgroundImageView, aboveSubview: barBackground)
+ insertSubview(fakeView, belowSubview: backgroundImageView)
+ layoutIfNeeded()
+ }
+
+    private func setupShadowView() {
              +        if let image = originShadowImage, image.size == CGSize.zero {
              + shadowImageView.image = image
+        } else {
              + shadowImageView.backgroundColor = UIColor(red: 0, green: 0, blue: 0,
+ alpha: 77.0 / 255)
+ }
+
+ shadowImageView.alpha = originShadowImage == nil ? 1 : 0
+ getShadowView()?.isHidden = true
+ }
+
+    private func setupBackgroundImageView() {
              +        if isPush {
              + fakeView.alpha = 0
+ backgroundImageView.image = targetBgImage
+        } else {
              + setBackgroundImage()
+ fakeView.alpha = 1
+ backgroundImageView.image = currBgImage
+ }
+ }
+
+ /// interactivePopGestureRecognizer
+    func transitionAnimationWithPercent(_ percent: CGFloat) {
              +        switch bounce {
              + case .forward, .none:
+ transitionShadowAnimationWithPercent(percent)
+ transitionBackgroundAnimationWithPercent(percent)
+ break
+ case .backward:
+ transitionShadowAnimationWithPercent(1 - percent)
+ transitionBackgroundAnimationWithPercent(1 - percent)
+ break
+ }
+ }
+
+    func transitionAnimation() {
              + transitionShadowAnimation()
+ transitionBackgroundAnimation()
+ }
+
+    private func transitionShadowAnimation() {
              +        guard hasChangedShadow else { return }
              + shadowImageView.alpha = originShadowImage == nil ? 0 : 1
+//        if originShadowImage == nil {
              +// shadowImageView.alpha = isInteractive ? (1 - percent) * 1 : 0
+//        } else {
              +// shadowImageView.alpha = isInteractive ? percent * 1 : 1
+// }
+ }
+
+    private func transitionBackgroundAnimation() {
              +        guard hasChangedBgImage else { return }
              +        if isPush {
              + fakeView.alpha = 1
+ backgroundImageView.frame.origin.x = 0
+        } else {
              + fakeView.alpha = 0
+ backgroundImageView.frame.origin.x = bounds.width
+ }
+ }
+
+    private func transitionShadowAnimationWithPercent(_ percent: CGFloat) {
              +        guard hasChangedShadow else { return }
              + shadowImageView.alpha = originShadowImage == nil ? (1 - percent) * 1 : percent * 1
+ }
+
+    private func transitionBackgroundAnimationWithPercent(_ percent: CGFloat) {
              +        guard hasChangedBgImage else { return }
              + fakeView.alpha = (1 - percent) * 1
+ backgroundImageView.frame.origin.x = percent * bounds.width
+ }
+
+    func clear() {
              +
+        if isPush && hasChangedBgImage { setBackgroundImage() }
              +
+        if !isPush && bounce == .backward && hasChangedBgImage {
              + targetBgImage = currBgImage
+ setBackgroundImage()
+ }
+
+ getShadowView()?.isHidden = false
+
+ fakeView.removeFromSuperview()
+ shadowImageView.removeFromSuperview()
+ backgroundImageView.removeFromSuperview()
+
+ currBgImage = nil
+ targetBgImage = nil
+
+ hasChangedBgImage = false
+ hasChangedShadow = false
+
+ bounce = .none
+ }
+}
+
+extension NavigationBar {
              +    enum Bounce {
              + case none
+ case backward
+ case forward
+ }
+}
                @@ -2,28 +2,110 @@  | 
            ||
| 2 | 2 | 
                // NavigationController.swift  | 
            
| 3 | 3 | 
                // PaiaiUIKit  | 
            
| 4 | 4 | 
                //  | 
            
| 5 | 
                -// Created by ffib on 2019/4/3.  | 
            |
| 6 | 
                -// Copyright © 2019 yb. All rights reserved.  | 
            |
| 5 | 
                +// Created by ffib on 2019/4/23.  | 
            |
| 6 | 
                +// Copyright © 2019 FFIB. All rights reserved.  | 
            |
| 7 | 7 | 
                //  | 
            
| 8 | 8 | 
                 | 
            
| 9 | 9 | 
                import UIKit  | 
            
| 10 | 10 | 
                 | 
            
| 11 | 
                -class NavigationController: UINavigationController {
               | 
            |
| 11 | 
                +public class NavigationController: UINavigationController {
               | 
            |
| 12 | 12 | 
                 | 
            
| 13 | 
                +    override public init(rootViewController: UIViewController) {
               | 
            |
| 14 | 
                + super.init(navigationBarClass: NavigationBar.classForCoder(), toolbarClass: nil)  | 
            |
| 15 | 
                +// super.init(rootViewController: rootViewController)  | 
            |
| 16 | 
                +// navigationBar.delegate = self  | 
            |
| 17 | 
                + self.viewControllers = [rootViewController]  | 
            |
| 18 | 
                + }  | 
            |
| 19 | 
                +  | 
            |
| 20 | 
                +    required init?(coder aDecoder: NSCoder) {
               | 
            |
| 21 | 
                + super.init(coder: aDecoder)  | 
            |
| 22 | 
                + }  | 
            |
| 23 | 
                +  | 
            |
| 24 | 
                +    override public init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
               | 
            |
| 25 | 
                + super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)  | 
            |
| 26 | 
                + }  | 
            |
| 27 | 
                +  | 
            |
| 28 | 
                +    override public func viewDidLoad() {
               | 
            |
| 29 | 
                + super.viewDidLoad()  | 
            |
| 30 | 
                + delegate = self  | 
            |
| 31 | 
                + interactivePopGestureRecognizer?.delegate = self  | 
            |
| 32 | 
                + interactivePopGestureRecognizer?.isEnabled = true  | 
            |
| 33 | 
                +  | 
            |
| 34 | 
                +  | 
            |
| 35 | 
                + interactivePopGestureRecognizer?.addTarget(self,  | 
            |
| 36 | 
                + action: #selector(handlePop(gestureRecognizer:)))  | 
            |
| 37 | 
                + }  | 
            |
| 38 | 
                +  | 
            |
| 39 | 
                + @objc  | 
            |
| 40 | 
                +    private func handlePop(gestureRecognizer: UIPanGestureRecognizer) {
               | 
            |
| 41 | 
                +        guard let navBar = navigationBar as? NavigationBar else { return }
               | 
            |
| 42 | 
                +        if gestureRecognizer.state == .began { navBar.isPush = false }
               | 
            |
| 43 | 
                +  | 
            |
| 44 | 
                +        guard navBar.needsInteractive else { return }
               | 
            |
| 45 | 
                +  | 
            |
| 46 | 
                + let percent = gestureRecognizer.translation(in: view).x / view.bounds.width  | 
            |
| 47 | 
                +  | 
            |
| 48 | 
                +        if gestureRecognizer.state == .began || gestureRecognizer.state == .changed {
               | 
            |
| 49 | 
                + navBar.transitionAnimationWithPercent(percent)  | 
            |
| 50 | 
                + }  | 
            |
| 51 | 
                +  | 
            |
| 52 | 
                + guard gestureRecognizer.state == .ended  | 
            |
| 53 | 
                + || gestureRecognizer.state == .cancelled  | 
            |
| 54 | 
                + || gestureRecognizer.state == .failed,  | 
            |
| 55 | 
                +            let coordinator = transitionCoordinator else { return }
               | 
            |
| 56 | 
                +  | 
            |
| 57 | 
                + navBar.bounce = percent < 0.5 ? .backward : .forward  | 
            |
| 58 | 
                + let durationPercent = Double(percent < 0.5 ? coordinator.percentComplete : (1 - coordinator.percentComplete))  | 
            |
| 59 | 
                + UIView.animate(withDuration: coordinator.transitionDuration * durationPercent, delay: 0, usingSpringWithDamping: 1,  | 
            |
| 60 | 
                +                       initialSpringVelocity: coordinator.completionVelocity, options: [], animations: {
               | 
            |
| 61 | 
                + navBar.transitionAnimationWithPercent(1)  | 
            |
| 62 | 
                +        }) { _ in
               | 
            |
| 63 | 
                + navBar.clear()  | 
            |
| 64 | 
                + }  | 
            |
| 65 | 
                + }  | 
            |
| 13 | 66 | 
                }  | 
            
| 14 | 67 | 
                 | 
            
| 15 | 
                -//class NavigationController: UINavigationController {
               | 
            |
| 16 | 
                -//  | 
            |
| 17 | 
                -//    override func viewDidLoad() {
               | 
            |
| 18 | 
                -// super.viewDidLoad()  | 
            |
| 19 | 
                -//  | 
            |
| 20 | 
                -// // Do any additional setup after loading the view.  | 
            |
| 21 | 
                -// }  | 
            |
| 22 | 
                -//  | 
            |
| 23 | 
                -// func set  | 
            |
| 24 | 
                -//}  | 
            |
| 25 | 
                -//  | 
            |
| 26 | 
                -//  | 
            |
| 27 | 
                -//extension UIViewController {
               | 
            |
| 28 | 
                -// n  | 
            |
| 29 | 
                -//}  | 
            |
| 68 | 
                +extension NavigationController: UINavigationControllerDelegate {
               | 
            |
| 69 | 
                +  | 
            |
| 70 | 
                +    public func navigationController(_ navigationController: UINavigationController, animationControllerFor operation: UINavigationController.Operation, from fromVC: UIViewController, to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? {
               | 
            |
| 71 | 
                + (navigationBar as? NavigationBar)?.isPush = operation == .push  | 
            |
| 72 | 
                + return nil  | 
            |
| 73 | 
                + }  | 
            |
| 74 | 
                +  | 
            |
| 75 | 
                +    public func navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool) {
               | 
            |
| 76 | 
                + guard let navBar = navigationBar as? NavigationBar,  | 
            |
| 77 | 
                +            navBar.needsInteractive else { return }
               | 
            |
| 78 | 
                +  | 
            |
| 79 | 
                + guard let coordinator = transitionCoordinator,  | 
            |
| 80 | 
                +            animated else {
               | 
            |
| 81 | 
                + navBar.setBackgroundImage()  | 
            |
| 82 | 
                + navBar.clear()  | 
            |
| 83 | 
                + return  | 
            |
| 84 | 
                + }  | 
            |
| 85 | 
                +  | 
            |
| 86 | 
                + navBar.constructViewHierarchy()  | 
            |
| 87 | 
                +  | 
            |
| 88 | 
                +        guard !coordinator.isInteractive else { return }
               | 
            |
| 89 | 
                +  | 
            |
| 90 | 
                +        coordinator.animate(alongsideTransition: { (transitionContext) in
               | 
            |
| 91 | 
                +            DispatchQueue.main.async {
               | 
            |
| 92 | 
                + UIView.beginAnimations(nil, context: nil)  | 
            |
| 93 | 
                + UIView.setAnimationCurve(transitionContext.completionCurve)  | 
            |
| 94 | 
                + UIView.setAnimationDuration(transitionContext.transitionDuration)  | 
            |
| 95 | 
                + navBar.transitionAnimation()  | 
            |
| 96 | 
                + UIView.commitAnimations()  | 
            |
| 97 | 
                + }  | 
            |
| 98 | 
                +        }, completion: { (transitionContext) in
               | 
            |
| 99 | 
                + navBar.clear()  | 
            |
| 100 | 
                + })  | 
            |
| 101 | 
                + }  | 
            |
| 102 | 
                +}  | 
            |
| 103 | 
                +  | 
            |
| 104 | 
                +extension NavigationController: UIGestureRecognizerDelegate {
               | 
            |
| 105 | 
                +    public func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
               | 
            |
| 106 | 
                +        if gestureRecognizer == interactivePopGestureRecognizer {
               | 
            |
| 107 | 
                + return viewControllers.count > 1  | 
            |
| 108 | 
                + }  | 
            |
| 109 | 
                + return true  | 
            |
| 110 | 
                + }  | 
            |
| 111 | 
                +}  | 
            
                @@ -72,7 +72,7 @@ open class PageViewController: UIViewController {
               | 
            ||
| 72 | 72 | 
                constructViewHierarchy()  | 
            
| 73 | 73 | 
                activateConstraints()  | 
            
| 74 | 74 | 
                setMenuGestureRecognizer()  | 
            
| 75 | 
                - setupNavigationBarInteractivePopDelegate()  | 
            |
| 75 | 
                +  | 
            |
| 76 | 76 | 
                }  | 
            
| 77 | 77 | 
                 | 
            
| 78 | 78 | 
                     open override func viewDidLayoutSubviews() {
               | 
            
                @@ -90,8 +90,8 @@ open class PageViewController: UIViewController {
               | 
            ||
| 90 | 90 | 
                }  | 
            
| 91 | 91 | 
                 | 
            
| 92 | 92 | 
                     private func constructViewHierarchy() {
               | 
            
| 93 | 
                + navigationItem.titleView = menuView  | 
            |
| 93 | 94 | 
                view.addSubview(scrollView)  | 
            
| 94 | 
                - navigationController?.navigationBar.addSubview(menuView)  | 
            |
| 95 | 95 | 
                menuView.addSubview(sliderView)  | 
            
| 96 | 96 | 
                }  | 
            
| 97 | 97 | 
                }  | 
            
                @@ -150,15 +150,12 @@ fileprivate extension PageViewController {
               | 
            ||
| 150 | 150 | 
                 | 
            
| 151 | 151 | 
                let left: NSLayoutConstraint  | 
            
| 152 | 152 | 
                             if let lastLabel = last {
               | 
            
| 153 | 
                - left = label.leftAnchor  | 
            |
| 154 | 
                - .constraint(equalTo: lastLabel.rightAnchor, constant: option.spacing)  | 
            |
| 153 | 
                + left = label.leftAnchor.constraint(equalTo: lastLabel.rightAnchor, constant: option.spacing)  | 
            |
| 155 | 154 | 
                             } else {
               | 
            
| 156 | 
                - left = label.leadingAnchor  | 
            |
| 157 | 
                - .constraint(equalTo: menuView.leadingAnchor)  | 
            |
| 155 | 
                + left = label.leadingAnchor.constraint(equalTo: menuView.leadingAnchor)  | 
            |
| 158 | 156 | 
                }  | 
            
| 159 | 157 | 
                 | 
            
| 160 | 
                - let centerY = label.centerYAnchor  | 
            |
| 161 | 
                - .constraint(equalTo: menuView.centerYAnchor)  | 
            |
| 158 | 
                + let centerY = label.centerYAnchor.constraint(equalTo: menuView.centerYAnchor)  | 
            |
| 162 | 159 | 
                 | 
            
| 163 | 160 | 
                             if i == 0 {
               | 
            
| 164 | 161 | 
                label.textColor = option.selectedColor  | 
            
                @@ -178,17 +175,16 @@ fileprivate extension PageViewController {
               | 
            ||
| 178 | 175 | 
                 | 
            
| 179 | 176 | 
                     func setSliderViewDetail() {
               | 
            
| 180 | 177 | 
                         guard let label = menuView.viewWithTag(baseTag) else { return }
               | 
            
| 181 | 
                - sliderConstraint = sliderView.centerXAnchor  | 
            |
| 182 | 
                - .constraint(equalTo: label.centerXAnchor)  | 
            |
| 178 | 
                + sliderConstraint = sliderView.centerXAnchor.constraint(equalTo: label.centerXAnchor)  | 
            |
| 183 | 179 | 
                 | 
            
| 184 | 
                - NSLayoutConstraint.activate([sliderConstraint!])  | 
            |
| 180 | 
                + NSLayoutConstraint.activate([sliderConstraint!,  | 
            |
| 181 | 
                + sliderView.topAnchor.constraint(equalTo: label.bottomAnchor, constant: 6)])  | 
            |
| 185 | 182 | 
                }  | 
            
| 186 | 183 | 
                }  | 
            
| 187 | 184 | 
                 | 
            
| 188 | 185 | 
                /// layout  | 
            
| 189 | 186 | 
                 fileprivate extension PageViewController {
               | 
            
| 190 | 187 | 
                     func activateConstraints() {
               | 
            
| 191 | 
                - activateConstraintsMenuView()  | 
            |
| 192 | 188 | 
                activateConstraintsSliderView()  | 
            
| 193 | 189 | 
                activateConstraintsScrollView()  | 
            
| 194 | 190 | 
                }  | 
            
                @@ -206,18 +202,6 @@ fileprivate extension PageViewController {
               | 
            ||
| 206 | 202 | 
                NSLayoutConstraint.activate([width, height, top, leading, bottom, trailing])  | 
            
| 207 | 203 | 
                }  | 
            
| 208 | 204 | 
                 | 
            
| 209 | 
                -    func activateConstraintsMenuView() {
               | 
            |
| 210 | 
                -        guard let barContentView = navigationController?.navigationBar else {  return }
               | 
            |
| 211 | 
                -  | 
            |
| 212 | 
                - menuView.translatesAutoresizingMaskIntoConstraints = false  | 
            |
| 213 | 
                -  | 
            |
| 214 | 
                - NSLayoutConstraint.activate([  | 
            |
| 215 | 
                - menuView.topAnchor.constraint(equalTo: barContentView.topAnchor),  | 
            |
| 216 | 
                - menuView.bottomAnchor.constraint(equalTo: barContentView.bottomAnchor),  | 
            |
| 217 | 
                - menuView.centerXAnchor.constraint(equalTo: barContentView.centerXAnchor)  | 
            |
| 218 | 
                - ])  | 
            |
| 219 | 
                - }  | 
            |
| 220 | 
                -  | 
            |
| 221 | 205 | 
                     func activateConstraintsSliderView() {
               | 
            
| 222 | 206 | 
                 | 
            
| 223 | 207 | 
                sliderView.translatesAutoresizingMaskIntoConstraints = false  | 
            
                @@ -366,9 +350,3 @@ fileprivate extension PageViewController {
               | 
            ||
| 366 | 350 | 
                }  | 
            
| 367 | 351 | 
                }  | 
            
| 368 | 352 | 
                }  | 
            
| 369 | 
                -  | 
            |
| 370 | 
                -extension PageViewController: NavigationBarInteractiveViewController {    
               | 
            |
| 371 | 
                -    public var navigationView: UIView {
               | 
            |
| 372 | 
                - return menuView  | 
            |
| 373 | 
                - }  | 
            |
| 374 | 
                -}  | 
            
                @@ -86,5 +86,4 @@ extension GroupNameModificationViewController {
               | 
            ||
| 86 | 86 | 
                }  | 
            
| 87 | 87 | 
                }  | 
            
| 88 | 88 | 
                 | 
            
| 89 | 
                -  | 
            |
| 90 | 89 | 
                 extension GroupNameModificationViewController: NavigationBackViewController {}
               | 
            
                @@ -59,6 +59,7 @@ final class GroupViewController: UIViewController {
               | 
            ||
| 59 | 59 | 
                bundle: Bundle(identifier: "com.Paiai-iOS")),  | 
            
| 60 | 60 | 
                forCellWithReuseIdentifier: "photoCell")  | 
            
| 61 | 61 | 
                setup()  | 
            
| 62 | 
                + setNavigationBar()  | 
            |
| 62 | 63 | 
                binding()  | 
            
| 63 | 64 | 
                }  | 
            
| 64 | 65 | 
                 | 
            
                @@ -149,7 +150,7 @@ fileprivate extension GroupViewController {
               | 
            ||
| 149 | 150 | 
                }  | 
            
| 150 | 151 | 
                }  | 
            
| 151 | 152 | 
                 | 
            
| 152 | 
                -extension GroupViewController: NavigationBarInteractiveViewController {
               | 
            |
| 153 | 
                +extension GroupViewController {
               | 
            |
| 153 | 154 | 
                     var navigationView: UIView {
               | 
            
| 154 | 155 | 
                return navigationBarView  | 
            
| 155 | 156 | 
                }  | 
            
                @@ -157,14 +158,13 @@ extension GroupViewController: NavigationBarInteractiveViewController {
               | 
            ||
| 157 | 158 | 
                     func setNavigationBar() {
               | 
            
| 158 | 159 | 
                         guard navigationViewNotReady else { return }
               | 
            
| 159 | 160 | 
                setRightBarButtonItems()  | 
            
| 160 | 
                - construvtNaivgationViewHierarchy()  | 
            |
| 161 | 
                + constructNaivgationViewHierarchy()  | 
            |
| 161 | 162 | 
                activateConstraintsNavigation()  | 
            
| 162 | 
                -  | 
            |
| 163 | 163 | 
                navigationViewNotReady = false  | 
            
| 164 | 164 | 
                }  | 
            
| 165 | 165 | 
                 | 
            
| 166 | 
                -    private func construvtNaivgationViewHierarchy() {
               | 
            |
| 167 | 
                - navigationController?.navigationBar.addSubview(navigationBarView)  | 
            |
| 166 | 
                +    private func constructNaivgationViewHierarchy() {
               | 
            |
| 167 | 
                + navigationItem.titleView = navigationBarView  | 
            |
| 168 | 168 | 
                navigationBarView.addSubview(navigationBarViewImage)  | 
            
| 169 | 169 | 
                navigationBarView.addSubview(navigationBarViewTitle)  | 
            
| 170 | 170 | 
                }  | 
            
                @@ -172,7 +172,7 @@ extension GroupViewController: NavigationBarInteractiveViewController {
               | 
            ||
| 172 | 172 | 
                     private func setRightBarButtonItems() {
               | 
            
| 173 | 173 | 
                let item = UIBarButtonItem(images: [UIImage(named: "navigation-QR"),  | 
            
| 174 | 174 | 
                UIImage(named: "navigation-right")],  | 
            
| 175 | 
                - targets: [self, viewModel],  | 
            |
| 175 | 
                + targets: [self, viewModel!],  | 
            |
| 176 | 176 | 
                actions: [#selector(GroupViewController.presentGroupQR),  | 
            
| 177 | 177 | 
                #selector(GroupViewModel.navigateToGroupDetail)])  | 
            
| 178 | 178 | 
                 | 
            
                @@ -194,23 +194,10 @@ extension GroupViewController: NavigationBarInteractiveViewController {
               | 
            ||
| 194 | 194 | 
                 fileprivate extension GroupViewController {
               | 
            
| 195 | 195 | 
                 | 
            
| 196 | 196 | 
                     func activateConstraintsNavigation() {
               | 
            
| 197 | 
                - activateConstraintsNavigationBarView()  | 
            |
| 198 | 197 | 
                activateConstraintsNavigationBarViewImage()  | 
            
| 199 | 198 | 
                activateConstraintsNavigationBarViewTitle()  | 
            
| 200 | 199 | 
                }  | 
            
| 201 | 200 | 
                 | 
            
| 202 | 
                -    func activateConstraintsNavigationBarView() {
               | 
            |
| 203 | 
                -        guard let barContentView = navigationController?.navigationBar else {  return }
               | 
            |
| 204 | 
                -  | 
            |
| 205 | 
                - navigationBarView.translatesAutoresizingMaskIntoConstraints = false  | 
            |
| 206 | 
                -  | 
            |
| 207 | 
                - NSLayoutConstraint.activate([  | 
            |
| 208 | 
                - navigationBarView.topAnchor.constraint(equalTo: barContentView.topAnchor),  | 
            |
| 209 | 
                - navigationBarView.bottomAnchor.constraint(equalTo: barContentView.bottomAnchor),  | 
            |
| 210 | 
                - navigationBarView.centerXAnchor.constraint(equalTo: barContentView.centerXAnchor)  | 
            |
| 211 | 
                - ])  | 
            |
| 212 | 
                - }  | 
            |
| 213 | 
                -  | 
            |
| 214 | 201 | 
                     func activateConstraintsNavigationBarViewTitle() {
               | 
            
| 215 | 202 | 
                navigationBarViewTitle.translatesAutoresizingMaskIntoConstraints = false  | 
            
| 216 | 203 | 
                NSLayoutConstraint.activate([  | 
            
                @@ -24,7 +24,8 @@ final class ScanQRViewController: UIViewController {
               | 
            ||
| 24 | 24 | 
                     override func viewDidLoad() {
               | 
            
| 25 | 25 | 
                super.viewDidLoad()  | 
            
| 26 | 26 | 
                scanView.delegate = self  | 
            
| 27 | 
                - viewModel.join(code: "http://pai.ai/g/SpA5be3")  | 
            |
| 27 | 
                +// viewModel.join(code: "http://pai.ai/g/SpA5be3")  | 
            |
| 28 | 
                + setNavigationBar()  | 
            |
| 28 | 29 | 
                }  | 
            
| 29 | 30 | 
                 | 
            
| 30 | 31 | 
                     func setNavigationBar() {
               | 
            
                @@ -34,7 +35,7 @@ final class ScanQRViewController: UIViewController {
               | 
            ||
| 34 | 35 | 
                 | 
            
| 35 | 36 | 
                     override func viewWillAppear(_ animated: Bool) {
               | 
            
| 36 | 37 | 
                super.viewWillAppear(animated)  | 
            
| 37 | 
                - setNavigationBar()  | 
            |
| 38 | 
                +  | 
            |
| 38 | 39 | 
                }  | 
            
| 39 | 40 | 
                 | 
            
| 40 | 41 | 
                     override func viewWillDisappear(_ animated: Bool) {
               | 
            
                @@ -48,7 +48,7 @@ final class MessageListViewController: UIViewController {
               | 
            ||
| 48 | 48 | 
                setup()  | 
            
| 49 | 49 | 
                binding()  | 
            
| 50 | 50 | 
                setNavigationBar()  | 
            
| 51 | 
                - self.viewModel.reload()  | 
            |
| 51 | 
                + self.viewModel.reload()  | 
            |
| 52 | 52 | 
                }  | 
            
| 53 | 53 | 
                 | 
            
| 54 | 54 | 
                     private func setNavigationBar() {
               | 
            
                @@ -174,19 +174,6 @@ fileprivate extension MessageListViewController {
               | 
            ||
| 174 | 174 | 
                self.tableView.endRefreshing(at: .bottom)  | 
            
| 175 | 175 | 
                }  | 
            
| 176 | 176 | 
                }).disposed(by: disposeBag)  | 
            
| 177 | 
                -  | 
            |
| 178 | 
                - viewModel.hasMoreData  | 
            |
| 179 | 
                - .asDriver(onErrorJustReturn: true)  | 
            |
| 180 | 
                -            .drive(onNext: {[weak self] flag in
               | 
            |
| 181 | 
                -                guard let `self` = self else { return }
               | 
            |
| 182 | 
                -                if flag {
               | 
            |
| 183 | 
                -                    if self.tableView.bottomPullToRefresh == nil {
               | 
            |
| 184 | 
                - self.setupLoadingControl()  | 
            |
| 185 | 
                - }  | 
            |
| 186 | 
                -                } else {
               | 
            |
| 187 | 
                -// self.tableViewt  | 
            |
| 188 | 
                - }  | 
            |
| 189 | 
                - }).disposed(by: disposeBag)  | 
            |
| 190 | 177 | 
                }  | 
            
| 191 | 178 | 
                }  | 
            
| 192 | 179 | 
                 | 
            
                @@ -128,19 +128,6 @@ fileprivate extension MineGroupViewController {
               | 
            ||
| 128 | 128 | 
                self.tableView.endRefreshing(at: .bottom)  | 
            
| 129 | 129 | 
                }  | 
            
| 130 | 130 | 
                }).disposed(by: disposeBag)  | 
            
| 131 | 
                -  | 
            |
| 132 | 
                - viewModel.hasMoreData  | 
            |
| 133 | 
                - .asDriver(onErrorJustReturn: true)  | 
            |
| 134 | 
                -            .drive(onNext: {[weak self] flag in
               | 
            |
| 135 | 
                -                guard let `self` = self else { return }
               | 
            |
| 136 | 
                -                if flag {
               | 
            |
| 137 | 
                -                    if self.tableView.bottomPullToRefresh == nil {
               | 
            |
| 138 | 
                - self.setupLoadingControl()  | 
            |
| 139 | 
                - }  | 
            |
| 140 | 
                -                } else {
               | 
            |
| 141 | 
                - // self.tableViewt  | 
            |
| 142 | 
                - }  | 
            |
| 143 | 
                - }).disposed(by: disposeBag)  | 
            |
| 144 | 131 | 
                }  | 
            
| 145 | 132 | 
                }  | 
            
| 146 | 133 | 
                 | 
            
                @@ -111,19 +111,6 @@ fileprivate extension MineOrderViewController {
               | 
            ||
| 111 | 111 | 
                self.tableView.endRefreshing(at: .bottom)  | 
            
| 112 | 112 | 
                }  | 
            
| 113 | 113 | 
                }).disposed(by: disposeBag)  | 
            
| 114 | 
                -  | 
            |
| 115 | 
                - viewModel.hasMoreData  | 
            |
| 116 | 
                - .asDriver(onErrorJustReturn: true)  | 
            |
| 117 | 
                -            .drive(onNext: {[weak self] flag in
               | 
            |
| 118 | 
                -                guard let `self` = self else { return }
               | 
            |
| 119 | 
                -                if flag {
               | 
            |
| 120 | 
                -                    if self.tableView.bottomPullToRefresh == nil {
               | 
            |
| 121 | 
                - self.setupLoadingControl()  | 
            |
| 122 | 
                - }  | 
            |
| 123 | 
                -                } else {
               | 
            |
| 124 | 
                - // self.tableViewt  | 
            |
| 125 | 
                - }  | 
            |
| 126 | 
                - }).disposed(by: disposeBag)  | 
            |
| 127 | 114 | 
                }  | 
            
| 128 | 115 | 
                }  | 
            
| 129 | 116 | 
                 |